home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / developer_install / CEGUISDK-0.4.1-VC6-Native.exe / {app} / Samples / common / include / CEGuiRendererSelector.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-03-10  |  3.8 KB  |  108 lines

  1. /************************************************************************
  2.     filename:   CEGuiRendererSelector.h
  3.     created:    24/9/2004
  4.     author:     Paul D Turner
  5. *************************************************************************/
  6. /*************************************************************************
  7.     Crazy Eddie's GUI System (http://www.cegui.org.uk)
  8.     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
  9.  
  10.     This library is free software; you can redistribute it and/or
  11.     modify it under the terms of the GNU Lesser General Public
  12.     License as published by the Free Software Foundation; either
  13.     version 2.1 of the License, or (at your option) any later version.
  14.  
  15.     This library is distributed in the hope that it will be useful,
  16.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18.     Lesser General Public License for more details.
  19.  
  20.     You should have received a copy of the GNU Lesser General Public
  21.     License along with this library; if not, write to the Free Software
  22.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  23. *************************************************************************/
  24. #ifndef _CEGuiRendererSelector_h_
  25. #define _CEGuiRendererSelector_h_
  26.  
  27. /*!
  28. \brief
  29.     Enumeration of available renderer types.
  30. */
  31. enum CEGuiRendererType
  32. {
  33.     OgreGuiRendererType,            //!< Renderer that uses the Ogre engine.
  34.     Direct3D81GuiRendererType,      //!< Renderer that uses the Direct3D 8.1 API.
  35.     Direct3D9GuiRendererType,       //!< Renderer that uses the Direct3D 9 API.
  36.     OpenGLGuiRendererType,          //!< Renderer that uses the OpenGL API.
  37.     IrrlichtGuiRendererType,        //!< Renderer that uses the Irrlicht engine.
  38.     RendererTypeCount,              //!< Special value that equals the number of renderer types.
  39.     InvalidGuiRendererType          //!< Special value used to represent an invalid selection.
  40. };
  41.  
  42.  
  43. /*!
  44. \brief
  45.     Base class for the renderer selection dialog class.
  46.  
  47.     This should be sub-classed to do something useful.  Initialisation should happen in the constructor and cleanup
  48.     in the destructor.  The inkokeDialog should only display the dialog (and not return until the dialog is dismissed).
  49. */
  50. class CEGuiRendererSelector
  51. {
  52. public:
  53.     /*!
  54.     \brief
  55.         Constructor.
  56.     */
  57.     CEGuiRendererSelector();
  58.  
  59.  
  60.     /*!
  61.     \brief
  62.         Destructor.
  63.     */
  64.     virtual ~CEGuiRendererSelector();
  65.  
  66.  
  67.     /*!
  68.     \brief
  69.         Displays a dialog allowing the user to select a renderer to be used.
  70.  
  71.     \return
  72.         false if the user cancelled.
  73.     */
  74.     virtual bool inkokeDialog()  = 0;
  75.  
  76.  
  77.     /*!
  78.     \brief
  79.         Return the CEGuiRendererType value of the renderer most recently selected by the user.
  80.  
  81.     \return
  82.         One of the CEGuiRendererType enumerated values.
  83.     */
  84.     CEGuiRendererType getSelectedRendererType();
  85.  
  86.  
  87.     /*!
  88.     \brief
  89.         Set whether or not a specific renderer type will be available for selection from the dialog the next time it
  90.         is displayed.
  91.  
  92.     \param rendererType
  93.         One of the CEGuiRendererType enumerated values representing the renderer whos availability will be set.
  94.  
  95.     \param available
  96.         - true if this renderer should be available to the user.
  97.         - false if this renderer should not be available.
  98.     */
  99.     void setRendererAvailability(CEGuiRendererType rendererType, bool available = true);
  100.  
  101.  
  102. protected:
  103.     CEGuiRendererType   d_lastSelected;         //!< Holds the last selected renderer type.
  104.     bool    d_rendererAvailability[RendererTypeCount];  //!< Holds availability of renderer types.
  105. };
  106.  
  107. #endif  // end of guard _CEGuiRendererSelector_h_
  108.